# Tagfolder
#http://code.google.com/p/tagfolder/
#Licensed under LGPL
#
#

PROJECT(COMMON)

INCLUDE_DIRECTORIES(BEFORE 	
	"${tagfolder_base_dir}/depends/include/"
        "${tagfolder_base_dir}/depends/sqlite3"
	"${tagfolder_base_dir}/modules/common/include/"
        "${CMAKE_CURRENT_SOURCE_DIR}")

LINK_DIRECTORIES(
	"${tagfolder_base_dir}/depends/lib/${gtest_lib_dir}/"
	)
MESSAGE("${tagfolder_base_dir}/depends/lib/${gtest_lib_dir}")

#
#Build client stub
#
SET(CLIENT_STUB_SRC 
	TFConfigurator.cpp
        TFChannel.cpp 
        TFNamedPipe.cpp 
        "${tagfolder_base_dir}/depends/sqlite3/sqlite3.c")

ADD_LIBRARY(client_stub_dynamic SHARED 
	${CLIENT_STUB_SRC})

SET_TARGET_PROPERTIES(client_stub_dynamic
	PROPERTIES
		OUTPUT_NAME "client_stub" 
		CLEAN_DIRECT_OUTPUT 1)

ADD_LIBRARY(client_stub_static STATIC 
	${CLIENT_STUB_SRC})

SET_TARGET_PROPERTIES(client_stub_static
	PROPERTIES
		OUTPUT_NAME "client_stub" 
		CLEAN_DIRECT_OUTPUT 1)



#
#Build test case
#
ADD_EXECUTABLE(TFConfiguratorTest 
        TFConfiguratorTest.cpp 
        TFConfigurator.cpp
        "${tagfolder_base_dir}/depends/sqlite3/sqlite3.c")

SET_TARGET_PROPERTIES(TFConfiguratorTest
        PROPERTIES
                LINK_FLAGS "/NODEFAULTLIB:LIBC.lib")

TARGET_LINK_LIBRARIES(TFConfiguratorTest 
	gtest.lib
        gtest_main.lib)
